﻿using System;
using System.Collections.Generic;
using System.Text;

namespace MathService.DSP.Signals.Interpolators
{
    [Serializable]
    public class Interpolator : ICloneable
    {
        public double this[double pos, double[] Values]
        {
            get { return GetValue(Values, pos); }
            set { SetValue(Values, pos, value); }
        }

        public virtual double GetValue(double[] Values, double pos)
        {
            return Values[(int)pos];
        }

        public virtual double SetValue(double[] Values, double pos, double Value)
        {
            return Values[(int)pos] = Value;
        }

        #region ICloneable Members

        public virtual object Clone()
        {
            return MemberwiseClone();
        }

        #endregion
    }
}
